using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools
{
    /// <summary>
    /// <para>Update Map Server Cache</para>
    /// <para>Updates a pre-rendered tiled cache for Map Server.</para>
    /// <para>更新 Map Server 的预渲染切片缓存。</para>
    /// </summary>    
    [DisplayName("Update Map Server Cache")]
    public class UpdateMapServerCache : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public UpdateMapServerCache()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_server_name">
        /// <para>Host</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_object_name">
        /// <para>Map Server</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_data_frame">
        /// <para>Data Frame</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_Layer">
        /// <para>Input Layers</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_levels">
        /// <para>Scales</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_update_mode">
        /// <para>Update Mode</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public UpdateMapServerCache(object _server_name, object _object_name, object _data_frame, List<object> _Layer, List<object> _levels, _update_mode_value? _update_mode)
        {
            this._server_name = _server_name;
            this._object_name = _object_name;
            this._data_frame = _data_frame;
            this._Layer = _Layer;
            this._levels = _levels;
            this._update_mode = _update_mode;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Update Map Server Cache";

        public override string CallName => "server.UpdateMapServerCache";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_server_name, _object_name, _data_frame, _Layer, _constraining_extent, _levels, _update_mode.GetGPValue(), _thread_count, _Antialiasing.GetGPValue(), _out_server_name, _out_object_name];

        /// <summary>
        /// <para>Host</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Host")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _server_name { get; set; }


        /// <summary>
        /// <para>Map Server</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Map Server")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _object_name { get; set; }


        /// <summary>
        /// <para>Data Frame</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Frame")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _data_frame { get; set; }


        /// <summary>
        /// <para>Input Layers</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layers")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _Layer { get; set; }


        /// <summary>
        /// <para>Update Extent</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _constraining_extent { get; set; } = null;


        /// <summary>
        /// <para>Scales</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _levels { get; set; }


        /// <summary>
        /// <para>Update Mode</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Mode")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _update_mode_value? _update_mode { get; set; }

        public enum _update_mode_value
        {
            /// <summary>
            /// <para>Recreate Empty Tiles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Recreate Empty Tiles")]
            [GPEnumValue("Recreate Empty Tiles")]
            _Recreate_Empty_Tiles,

            /// <summary>
            /// <para>Recreate All Tiles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Recreate All Tiles")]
            [GPEnumValue("Recreate All Tiles")]
            _Recreate_All_Tiles,

        }

        /// <summary>
        /// <para>Number of caching service instances</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of caching service instances")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _thread_count { get; set; } = null;


        /// <summary>
        /// <para>Antialiasing (Smoothes edges of labels and lines for improved display quality)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Antialiasing (Smoothes edges of labels and lines for improved display quality)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Antialiasing_value _Antialiasing { get; set; } = _Antialiasing_value._false;

        public enum _Antialiasing_value
        {
            /// <summary>
            /// <para>Antialiasing</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Antialiasing")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Host</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Host")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_server_name { get; set; }


        /// <summary>
        /// <para>Output Map Server</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Map Server")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_object_name { get; set; }


        public UpdateMapServerCache SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}